﻿@page "/"
@using SageKing.AspNetCore.Swagger
@using SageKing.Core.Options
@model SageKing.OpenIddictResource.Api.Pages.IndexModel
@inject SwaggerOptions SwaggerOptions
@inject OpenIdResourceOptions OpenIdoptions

@{
	ViewData["Title"] = "资源配置：";
}

<div class="centerall">
	<div>
		<h1>
			欢迎使用SageKing资源接口Api中心
		</h1>
		<h1>
			@ViewData["Title"]
		</h1>
		<ul>
			<li>Issuer: @OpenIdoptions.Issuer</li>
			<li>Client Id: @OpenIdoptions.ClientId</li>
			<li>Client Ip: @HttpContext.GetRemoteIpAddress()<li> 
		</ul>
		@if (SwaggerOptions.Enable)
		{
			<ul>  
				<li>Server Ip: @HttpContext.GetLocalIpAddress()<li>
			</ul>
			<h2><a href="/swagger/index.html">Swagger 接口库</a></h2>
		}
		<h3>当前时间： @DateTime.Now</h3>
	</div>
</div>

<style>
	.centerall {
		margin: 0;
		display: flex;
		justify-content: center;
		align-items: center;
		height: 85vh;
		overflow-y: hidden;
	}
</style>